package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.StorageMapper;
import com.gxa.saas.pojo.Storage;
import com.gxa.saas.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StorageServiceImpl implements StorageService {
    @Autowired
    StorageMapper storageMapper;

    @Override
    public Integer addStorage(Storage storage){
        return storageMapper.insert(storage);
    }

    @Override
    public List<Storage> selectByPage(Integer page, Integer size) {
        return storageMapper.selectByPage((page-1)*size,size);
    }
}
